import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import '../public/static/free.css';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/public.scss'
//引入组件
import './components/myComponents/index.js'
import ElementUI from 'element-ui';
import VueSignaturePad from 'vue-signature-pad';
Vue.use(VueSignaturePad);
Vue.use(ElementUI);


//自定义element-ui样式
import './styles/element-ui.scss'

import permission from  './plugins/permission'
Vue.use(permission)

import vueScroll from "vuescroll";//引入vuescroll
import "vuescroll/dist/vuescroll.css";//引入vuescroll样式
Vue.use(vueScroll);//使用
import horizontalScroll from '../public/el-table-horizontal-scroll'
Vue.use(horizontalScroll)

import '../public/static/ali_icon/iconfont.css';
import './styles/common.scss';
import router from './router.js';
import store from './store'
import $myPlay from "@/components/myPlay"
Vue.use($myPlay)
import $previewImg from '@/components/previewImg/index'
Vue.use($previewImg)

// 测试
// Vue.prototype.imageUrlprefix = 'http://192.168.1.253:9000/'
// 生产
Vue.prototype.imageUrlprefix = '/file/'

import './filter' //全局过滤器

Vue.config.productionTip = false
import { getListByDictType } from "@/api/sys/dictData";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, closeAndToPage,selectRanchName,downloadBlobFile,copyText} from "@/utils/common";
import { getNowDate} from "@/utils/index";
Vue.prototype.getDicts = getListByDictType
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.selectRanchName=selectRanchName
Vue.prototype.handleTree = handleTree
Vue.prototype.closeAndToPage = closeAndToPage
// Vue.prototype.stateDict = stateDict
Vue.prototype.getNowDate = getNowDate
Vue.prototype.downloadBlobFile = downloadBlobFile
Vue.prototype.copyText=copyText
import Pagination from "@/components/Pagination";

//事件总线
Vue.prototype.$bus = new Vue;

Vue.prototype.msgSuccess = function (msg) {
    this.$message({ showClose: true, message: msg, type: "success" });
}

Vue.prototype.msgError = function (msg) {
    this.$message({ showClose: true, message: msg, type: "error" });
}

Vue.prototype.msgWarning = function (msg) {
    this.$message.warning(msg);
}

Vue.prototype.msgInfo = function (msg) {
    this.$message.info(msg);
}


// 全局组件挂载
Vue.component('Pagination', Pagination)

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
